package lab02.test06;

public class Ladder {
    private double upbottom;
    private double downbottom;
    private double high;
    private double area;

    Ladder(){}

    Ladder(double upbottom,double downbottom,
           double high,double area){
        this.upbottom = upbottom;
        this.downbottom = downbottom;
        this.high = high;
        this.area = area;
    }

    public void setArea(double area) {
        this.area = area;
    }

    public double getArea(double upbottom,
                          double downbottom,
                          double high) {
        area = (upbottom + downbottom)*high/2;
        return area;
    }
}
